<%@ Control Language="C#" AutoEventWireup="true" CodeFile="forumgrid.ascx.cs" Inherits="forums_controls_forums_forumgrid" %>
<%@ Register Src="../threads/LastThread.ascx" TagName="LastThread" TagPrefix="uc1" %>
<asp:Repeater runat="server" ID="gridForums">
    <HeaderTemplate>
        <table width="100%" cellpadding="2" cellspacing="1">
            <asp:Literal runat="server" ID="ltrHeader"
                Visible='<%# ShowHeader %>'>
                <tr class="forum_grid_header">
                    <td width="50%">
                        Forum
                    </td>
                    <td width="10%">
                        Threads
                    </td>
                    <td width="10%">
                        Posts
                    </td>
                    <td width="30%">
                        Last Post
                    </td>
                </tr>
            </asp:Literal>
    </HeaderTemplate>
    <ItemTemplate>
            <tr class="forum_grid_item">
                <td align="left" valign="middle" width="50%">
                    <div class="forum_grid_item_title">
                        <asp:HyperLink runat="server" ID="lnkForum"
                            Text='<%# Helpers.StringHelper.SafeFormat(Eval("Name").ToString()) %>'
                            NavigateUrl='<%# Forum.SiteSettings.GetRelativePath(Helpers.StringHelper.SafeFormat("forum.aspx?f={0}", Eval("ID"))) %>'/>
                    </div>
                    <div class="forum_grid_item_description">
                        <asp:Label runat="server" ID="lblDescription"
                            Text='<%# Helpers.StringHelper.SafeFormat(Eval("Description")) %>' />
                    </div>
                </td>
                <td align="center" valign="middle" width="10%">
                    <%# Eval("TotalThreads") %>
                </td>
                <td align="center" valign="middle" width="10%">
                    <%# Eval("TotalPosts") %>
                </td>
                <td align="left" valign="middle" width="30%">
                    <uc1:LastThread id="LastThread1" runat="server" CurrentThread='<%# GetLastThread(Container.DataItem as DAL.Forum) %>'>
                    </uc1:LastThread>
                </td>
            </tr>
    </ItemTemplate>
    <FooterTemplate>
        </table>
    </FooterTemplate>
</asp:Repeater>